<template>
	<view class="cu-load load-modal">
		<view class="gray-text">加载中...</view>
	</view>
</template>

<script>
	export default{
		onLoad(options) {
			if(options.scene){
				//扫描商品海报二维码获取
				const scene = decodeURIComponent(options.scene);
				console.log("scene ",scene)
				var id =  scene;
				var that = this;
				that.$api.req({
					id:id
				},"/goods/getQrCodeInfo").then((res)=>{
					var d = res.data;
					console.log(d)
					if(d.success){
						var data = d.data;
						console.log(data)
						uni.redirectTo({
							url:"product?id="+data.goodsId+"&fatherId="+data.userId
						})
					}else{
						that.$api.msg(d.msg);
					}
				})
			}
		}
	}
</script>

<style>
</style>
